var a = getApp(), e = require("../../utils/config");
Page({
    data: {
        videoad: "adunit-50e525d3b997ee15"
    },
    openCamera: function() {
        wx.setStorage({
            key: "image_id",
            data: 8
        }), this.uploadImage(8, "camera");
    },
    openAlbum: function() {
        wx.setStorage({
            key: "image_id",
            data: 8
        }), this.uploadImage(8, "album");
    },
    upload: function() {
        wx.setStorage({
            key: "image_id",
            data: 8
        }), this.uploadImage(8);
    },
    getUserInfo: function(a) {
        wx.navigateTo({
            url: "../login/login"
        });
    },
    getIndexData: function() {
        var e = this;
        a._get("index/page", {}, function(a) {
            e.setData(a.data);
        });
    },
    imagesHeight: function(a) {
        var e = a.target.dataset.id, t = a.target.dataset.itemKey, i = 750 / (a.detail.width / a.detail.height), o = this.data.imgHeights;
        void 0 === o[t] && (o[t] = {}), o[t][e] = i;
        var n = this.data.imgCurrent;
        void 0 === n[t] && (n[t] = Object.keys(this.data.items[t].data)[0]), this.setData({
            imgHeights: o,
            imgCurrent: n
        });
    },
    bindChange: function(a) {
        var e = a.target.dataset.itemKey, t = this.data.imgCurrent;
        t[e] = a.detail.currentItemId, this.setData({
            imgCurrent: t
        });
    },
    goTop: function(a) {
        this.setData({
            scrollTop: 0
        });
    },
    scroll: function(a) {
        this.setData({
            indexSearch: a.detail.scrollTop
        }), a.detail.scrollTop > 300 ? this.setData({
            floorstatus: !0
        }) : this.setData({
            floorstatus: !1
        });
    },
    onShareAppMessage: function() {
        return {
            title: "月老配对导航",
            path: "/pages1/index/index",
            imageUrl: wx.getStorageSync("wxapp").navbar.imageUrl
        };
    }
});